﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Godot.core
{
    class Set<T> : ICollection<T>
    {
        #region Inner types
        //====================================================================================
        internal enum Color
        {
            COLOR_RED,
            COLOR_BLACK
        }

        internal struct Data
        {
            public Element root;
        }

        public class Element
        {
            internal Color color;
            internal Element right;
            internal Element left;
            internal Element parent;
            internal Element next;
            internal Element prev;
            internal T value;

            public Element() 
            {
			    color = Color.COLOR_RED;
		    }
        }
        //====================================================================================
        #endregion

        #region Fields & atributes
        //====================================================================================
        private Data _data;
        //====================================================================================
        #endregion

        #region Properties
        //====================================================================================
        public Element front
        {
            get
            {
                if (_data.root == null)
                    return null;

                Element e = _data.root.left;

                if (e == null)
                    return null;

                while (e.left != null)
                    e = e.left;

                return e;
            }
        }
        //====================================================================================
        #endregion

        public void Add(T item)
        {
            throw new NotImplementedException();
        }

        public void Clear()
        {
            throw new NotImplementedException();
        }

        public bool Contains(T item)
        {
            throw new NotImplementedException();
        }

        public void CopyTo(T[] array, int arrayIndex)
        {
            throw new NotImplementedException();
        }

        public int Count
        {
            get { throw new NotImplementedException(); }
        }

        public bool IsReadOnly
        {
            get { throw new NotImplementedException(); }
        }

        public bool Remove(T item)
        {
            throw new NotImplementedException();
        }

        public IEnumerator<T> GetEnumerator()
        {
            throw new NotImplementedException();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            throw new NotImplementedException();
        }
    }
}
